package com.woniuxy02;

import java.util.Scanner;

/**
 * @author 作者
 * @create 2025-10-23 14:49
 */
public class Test16 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("输入y");
        String answer ;

        for (answer = scanner.next();!answer.equals("y");answer = scanner.next()) {
            System.out.println("输入错误，重新输入y");
        }

        System.out.println("继续执行，程序结束");


    }
}
